# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2023-02-08
desc: 
sample: 
"""
import csv
import os

from util import get_project_path

path = os.path.join(get_project_path(),"files","user.csv")

with open(path, mode='w',newline='', encoding="utf-8") as f:
    fieldnames = ['username', 'pwd']
    csv_wrter = csv.DictWriter(f,fieldnames=fieldnames)
    csv_wrter.writeheader()
    data_list=[]
    for i in range(1,100001):
        data_list.append({'username':"admin"+str(i),"pwd":'123456'})
    csv_wrter.writerows(data_list)